Initiating a Transaction with the Java Library

JumioClient has two methods that provide fluent builder interfaces for initiating a transaction:

  • initiateNewAccount() for initiating a transaction for a new account.

  • addNewWorkflowToExistingAccount() for initiating a transaction for an existing account.

The builder steps provide a simple way to configure an account request.

For additional information on the low-level calls that are executed by the client see Creating or Updating Accounts.

Example: Initiate a Transaction for a New Account

The following snippet shows the fluent builder interface you can use to initiate a transaction for a new account:

WebResponse webResponse = jumioClient.initiateNewAccount(FluentBuilderWorkflows.STANDALONE_ID_VERIFICATION_10015)
                .customerInternalReference("my_company")
                .callbackUrl("https://myserver.mycompany.com/callback")
                .withDefaultCredentials()
                .performWeb(new WebSettings()
                        .successUrl("https://jumio.com/success")
                        .errorUrl("https://jumio.com/failure"));

.

Example: Initiate a Transaction for an Existing Account

The following snippet shows the fluent builder interface you can use to initiate a transaction for an existing account:

jumioClient.addNewWorkflowToExistingAccount(FluentBuilderWorkflows.fluentWorkflow(Workflows.workflow(10025)), accountId)
                .customerInternalReference(reference.toString())
                .callbackUrl(JUMIO_CALLBACK_PUBLIC_URL)
                .withDefaultCredentials()
                .performWeb(new WebSettings()
                        .successUrl("https://jumio.com/success")
                        .errorUrl("https://jumio.com/failure"));

Builder Steps

Builder Method Parameters Description Return Type

initiateNewAccount()

or

addNewWorkflowToExistingAccount()

FluentBuilderWorkflow<T> accessed as static object from FluentBuilderWorkflows.

addNewWorkflowToExistingAccount also requires the accountID as a String parameter.

FluentBuilderWorkflows provides static references to pre-defined objects for standard Jumio workflows.

CustomerReferenceBuilderStep<T>
customerInternalReference() String String that identifies your organization. CallbackUrlBuilderStep<T>

callbackUrl()

String

String representation of the URL to use for the Callback. If you do not need a callback enter null.

CredentialRequestBuilderStep<T>

withDefaultCredentials()

or

withSpecificCredentials()

No parameters

or

List<CredentialRequest> credentials

withDefaultCredentials() is used for workflows that do not require additional credential configuration.

or

withSpecificCredentials() is used with services such as DocV that require explicit credential specifications. A CredentialRequest allows you to configure the credential(s) required by the workflow. See Configuring Specific Credentials.

PerformWeb

or

PerformWebOrIdWithPreparedData

performWeb()

or

performUploadIds()

WebSettings

or

See Uploading Credentials with the Java Library.

Use a new WebSettings with no additional configuration to use the defaults configured in the Jumio Portal Settings. Optionally, you can override the successUrl and errorUrl by setting the appropriate values, as shown in the examples below.

or

See Uploading Credentials with the Java Library.

WebResponse

or

IdUploadResponse

 

JumioClient also has a getAccountAPI() method that returns an AccountApi object you can use if you require more detailed configuration.

 

WebResponse

The WebResponse object provides access to both the configured AccountRequest and the AccountResponse containing the values returned by Jumio. For example, you can extract the web URL and use it to launch the Web Client. See Returning the Jumio Web Client.

See also Creating or Updating Accounts > Account Response.